Skip to main content
This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal

Notes/Domino 8 Forum

Notes/Domino 8 Forum

Previous Next
Subject: EML export (with Keybd CRTL+SHIFT+S)
Feedback Type: Question
Product Area: Notes 8 Client
Technical Area: Functionality
Platform: Not Applicable
Release: 8.0
Reproducible: Always

It appears that every now and then people are asking about the EML export.
I've spent the last 2 days researching this on every forum possible and have concluded that I want to try my first hack of Lotusscript with the keybd commands (shudder).
I have seen the EML export code that has been floating around for years... it is waaay too involved for a hack like me. I also saw a cool class called DXLexporter (again waaay over this guy's head).

I cobbled together the below code which kinda works, I realize that I'm mixing oil and water...I just can't tell hpw to get out of this jam.

I think I'm confusing UI with traditional database commands that run in the background. Or possibly my problem is that I'm not shifting 'focus' to the opened 'view' which my keystrokes are intended for.

If someone can help me out of this jam then I will modify this code snippet to cycle through my entire mail file (5,000 docs) to save each doc to a folder as EML files. I may even get creative and add an index string to the file names so the folder is sortable.

Thanks in advance for any help!

Sub Initialize

Dim session As New NotesSession
Dim ws As New NotesUIWorkspace
Dim db As NotesDatabase
Dim collection As NotesDocumentCollection
Dim doc As NotesDocument
Dim uidoc As NotesUIDocument

Set db = session.CurrentDatabase
Set collection = db.AllDocuments
Set doc= collection.GetFirstDocument
Set stream = session.CreateStream


For x = 1 To 3 ' dev test on the first 3 emails
Set uidoc = ws.EditDocument(False,doc)
ws.ViewRefresh

REM Simulate CRTL+SHIFT+S for SaveAs prompt in UI for EML export

keybd_event 17,0,0,0 ' CRTL
keybd_event 16,0,0,0 ' SHIFT
keybd_event 83,0,0,0 ' S
keybd_event 17,0,2,0 ' CRTL
keybd_event 16,0,2,0 ' SHIFT
keybd_event 83,0,2,0 ' S

keybd_event 13,0,0,0 ' ENTER
keybd_event 13,0,2,0 '

Set doc= collection.GetNextDocument(doc)
Next

End Sub


Right now this opens three emails in their own views. And on the last email I get the save as box but the ENTER doesn't appear to fire.


Feedback number WEBB9MZT5X created by ~Bill Frojipyskiettu on 08/15/2014


EML export (with Keybd CRTL+SHIFT+S... (~Bill Frojipysk... 15.Aug.14)
. . update? (~Bill Frojipysk... 20.Aug.14)




Printer-friendly

Search this forum

Member Tools


RSS Feeds

 RSS feedsRSS
All forum posts RSS
All main topics RSS